<?php 
	//CORS跨域服务器端设置头信息
	header("Access-Control-Allow-Origin:*");
	$username = $_POST["username"];
	$password = $_post["password"];
	include "connect.php";
	$sql = "INSERT INTO mall(username,password) VALUES('$username','$password')";
	$result = mysql_query($sql);
	if($result){
		$arr = array("res_code"=>1,"res_body"=>"注册成功");
		echo json_encode($arr);
	}else{
		$arr = array("res_code"=>0,"res_body"=>"注册失败");
		echo json_encode($arr).mysql_error();
	};
	mysql_close();
 ?>